package com.example;

import com.example.androidmifarecarddemo.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainTestActivity extends Activity implements OnClickListener{
	
	private Button btClient,btService;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main_test);
		initView();
	}

	private void initView() {
		btClient = (Button) this.findViewById(R.id.btClient);
		btService = (Button) this.findViewById(R.id.btService);
		
		btClient.setOnClickListener(this);
		btService.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		Intent intent = new Intent();
		switch (v.getId()) {
		case R.id.btClient:
			intent.setClass(MainTestActivity.this, ClientActivity.class);
			MainTestActivity.this.startActivity(intent);
			break;
		case R.id.btService:
			intent.setClass(MainTestActivity.this, ServiceActivity.class);
			MainTestActivity.this.startActivity(intent);
			break;

		default:
			break;
		}
	}
	
	
}
